given {
    global['Content-Type'] = 'application/json'
    api = [
            post: {
                url "https://postman-echo.com/post"
                header(['Content-Type': global['Content-Type']])
                method "POST"
            },
            get : {
                url "https://postman-echo.com/get"
                method "GET"
            }
    ]
}

execute {
    body = 'This is expected to be sent back as part of response body.'
    callApi 'post'
    if (response.code == 200) {
        println response.body
    } else {
        return null
    }
    body = [a: 1, test: 2]
    callApi 'get'
    if (response.code == 200) {
        println response.body
        return response.body
    } else {
        return null
    }
}